package vj.linkedlist.utils;

import java.util.Random;

import vj.linkedlist.Node;

public class Tester {

	/**
	 * @param args
	 */
	/*public static void main(String[] args) {
		Node head = new Node(30);
		Node prev = head;
		for(int i = 0; i < 10 ; i++) {
			Random r = new Random();
			int d = r.nextInt(100) + 1;
			Node n = new Node(d);
			prev.next = n;
			prev = n;
		}
		Node head1 = new Node(12);
		prev = head1;
		for(int i = 0; i < 8 ; i++) {
			Random r = new Random();
			int d = r.nextInt(100) + 1;
			Node n = new Node(d);
			prev.next = n;
			prev = n;
		}
		printList(head);
		printList(head1);
		head = InsertionSort.insertSort(head);
		head1 = InsertionSort.insertSort(head1);
		printList(head);
		printList(head1);
		Node res = MergeSort.sortedMerge(head, head1);
		printList(res);
		
	}*/
	
	public static void main(String[] args) {
		Node head = new Node(30);
		Node prev = head;
		for(int i = 0; i < 11 ; i++) {
			Random r = new Random();
			int d = r.nextInt(100) + 1;
			Node n = new Node(d);
			prev.next = n;
			prev = n;
		}
		//LinkedListUtils.printList(head);
		//Node mid = MergeSort.splitAtMiddle(head);
		//head = MergeSort.mergeSort(head);
		//head = LinkedListUtils.reverse(head);
		//LinkedListUtils.printList(head);
		Node ref = head.next;
		System.out.println(head.next.data);
		System.out.println(ref.data);
	}
	
	
}
